package com.qingke.easyjava.demo.fdi;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class FactoryDiDemo {
	
	public static void main(String[] args) {
		ClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext("fdi.xml");
		
		Car car1=context.getBean("car",Car.class);
		System.out.println(car1);
		
		Car car2=context.getBean("car2",Car.class);
		System.out.println(car2);
		
		context.close();
	}

}
